/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.baicaix.chat.controllers;

import org.baicaix.chat.ChatConstants;
import org.puremvc.java.interfaces.INotification;
import org.puremvc.java.patterns.command.SimpleCommand;

/**
 *
 * @author baicaix
 */
public class StartUpCommand extends SimpleCommand {

    public StartUpCommand() {
    }

    @Override
    public void execute(INotification in) {
        super.execute(in);
        if(ChatConstants.START_UP.equals(in.getName())) {
            doInit();
        }
    }

    public void doInit() {
        //可以让同一个Command处理多个事情
        facade.registerCommand(ChatConstants.SHOW_FRAME_01, InitFrameCommand.class);
        facade.registerCommand(ChatConstants.SHOW_FRAME_02, InitFrameCommand.class);
    }
}
